package cn.it.infrastructure.po;

import lombok.Data;

import java.io.Serializable;

/**
 * 
 * @TableName tb_menu
 */
@Data
public class TbMenu implements Serializable {
    /**
     * 
     */
    private Integer id;

    /**
     * 菜单名字
     */
    private String menuName;

    /**
     * 点击触发的函数
     */
    private String menuClick;

    /**
     * 权限 0管理员，1-3表示商家:1所有权限,2取消下载权限,3取消查看权限
     */
    private String menuRight;

    /**
     * 
     */
    private String menuComponent;

    /**
     * 
     */
    private String menuIcon;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TbMenu other = (TbMenu) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getMenuName() == null ? other.getMenuName() == null : this.getMenuName().equals(other.getMenuName()))
            && (this.getMenuClick() == null ? other.getMenuClick() == null : this.getMenuClick().equals(other.getMenuClick()))
            && (this.getMenuRight() == null ? other.getMenuRight() == null : this.getMenuRight().equals(other.getMenuRight()))
            && (this.getMenuComponent() == null ? other.getMenuComponent() == null : this.getMenuComponent().equals(other.getMenuComponent()))
            && (this.getMenuIcon() == null ? other.getMenuIcon() == null : this.getMenuIcon().equals(other.getMenuIcon()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getMenuName() == null) ? 0 : getMenuName().hashCode());
        result = prime * result + ((getMenuClick() == null) ? 0 : getMenuClick().hashCode());
        result = prime * result + ((getMenuRight() == null) ? 0 : getMenuRight().hashCode());
        result = prime * result + ((getMenuComponent() == null) ? 0 : getMenuComponent().hashCode());
        result = prime * result + ((getMenuIcon() == null) ? 0 : getMenuIcon().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", menuName=").append(menuName);
        sb.append(", menuClick=").append(menuClick);
        sb.append(", menuRight=").append(menuRight);
        sb.append(", menuComponent=").append(menuComponent);
        sb.append(", menuIcon=").append(menuIcon);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}